package zero.common.config;

import com.jfinal.config.Routes;

import zero.security.auth.AdminAuthInterceptor;
import zero.security.controller.AdminController;
import zero.security.controller.GeneratorController;
import zero.security.controller.MenuController;
import zero.security.controller.OrgController;
import zero.security.controller.RoleController;
import zero.security.controller.SecurityTreeController;
import zero.security.controller.UserController;


/**
 * 
 * @Description 
 * @author hsongjiang
 * @date 2018年6月30日 上午9:40:49 
 * @version V0.1
 */
public class AdminRoutes extends Routes{

	@Override
	public void config() {
		// TODO Auto-generated method stub
		setBaseViewPath("WEB-INF/admin/");
		addInterceptor(new AdminAuthInterceptor());
		
		add("/admin", AdminController.class);
		// 用户、资源、角色等权限管理
		add("/security/user", UserController.class);
		add("/security/org", OrgController.class); // 部门管理
		add("/security/role", RoleController.class);
		add("/security/menu", MenuController.class);
		add("/security/tree", SecurityTreeController.class);	
		add("/security/generator",GeneratorController.class);
	}

}
